package com.wyy.response;

import lombok.Data;

/**
 * @program: gytcb
 * @author: 吴磊
 * @create: 2021-06-01 22:37
 */
@Data
public class CommonReturnType {
    private String status;
    private Object data;

    //定义一个通用的创建方法
    public static CommonReturnType create(Object data) {
        return CommonReturnType.create(data, "200");
    }


    public static CommonReturnType create(Object data, String status) {
        CommonReturnType commonReturnType = new CommonReturnType();
        commonReturnType.setStatus(status);
        commonReturnType.setData(data);
        return commonReturnType;
    }
}